import request from "../../request.js";

/**
 * 商品详情
 * @param {Object} productId
 */
function productDetail(productId) {
	return request({
		url: `/lejuClient/product/productDetail/${productId}`
	});
}

/**
 * 添加到购物车
 */
function addCart(data) {
	return request({
		url: '/lejuClient/cart/addCart',
		method: "POST",
		data
	});
}
/**
 * 生成订单
 * @param {Object} data
 */
function addPreOrder(data) {
	return request({
		url: '/lejuClient/order/addPreOrder',
		method: "POST",
		data
	});
}


export {
	addCart,
	productDetail,
	addPreOrder
}
